package com.hspedu.poly.polyparameter_;

public class Test {

    public double showEmpAnnual(Staff e) {
        return e.getAnnual();
    }

    public void testWork(Staff e) {
        //类型判断 + 向下转型
        if (e instanceof Gen_Staff) {
            ((Gen_Staff)e).work();
        } else if (e instanceof Manager) {
            ((Manager)e).manage();
        }
    }
}
